package com.helloblog.web.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.hello.service.impl.CoreSerivceImpl;
import com.helloblog.utils.EncodeHandler;

public class QRCoderAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		try {
			String userid = request.getParameter("id");
			System.out.println(userid);
			CoreSerivceImpl service = new CoreSerivceImpl();
			service.findUserByID(userid);
			return mapping.findForward("showuser");
		} catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("failed");
			
		}
	}
	
}
